<?php
/**
 * Zend Framework
 *
 * @category   Core_Application
 * @package    core
 * @copyright  Copyright (c) 2009 Kuśmierz Adam
 */

/**
 * Resource for creating database adapter
 *
 * @uses       Zend_Application_Resource_ResourceAbstract
 * @category   Core
 * @package    Core_Application
 * @subpackage Resource
 * @copyright  Copyright (c) 2009 Kuśmierz Adam
 */
class Core_Application_Resource_Db extends Zend_Application_Resource_Db
{
	/**
	 * Defined by Zend_Application_Resource_Resource
	 *
	 * @return Zend_Db_Adapter_Abstract|null
	 */
	public function init()
	{
		if (null !== ($db = $this->getDbAdapter())) {
			$db->setFetchMode(PDO::FETCH_OBJ);
			//$db->getProfiler()->setEnabled($config->profiler);
		}
		return parent::init();
	}
}
